Tool axis direction calculation method

ABSTRACT

A tool axis direction calculation method for determining a direction vector of the tool axis when a side is cut be a 5-axes numerically controlled machine tool. A normal vector (Ri) is determined at a dividing point (Pi) of the upper surface of a sculptured surface, and a normal vector (Si) is determined at a dividing point (Qi) of the lower surface thereof. Next, an intermediate vector (Ni) having a direction between the normal vector (Ri) and the normal vector (Si) and a size equal to the radius of a tool is determined. Offset points (Xi, Yi) are determined from the intermediate vector (Ni), and a vector (Zi) connecting the offset points (Xi, Yi) is determined as the direction vector of the tool axis. A direction vector of the tool axis closest to a generating line can be obtained, and thus a side closest to a desired sculptured surface can be cut.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a tool axis direction calculationmethod used in an automatic programming apparatus for creating NC data(machining program) for cutting a sculptured surface of a metal mold,and more specifically, to a tool axis direction calculation method ofdetermining a direction vector of a tool axis in a side cut carried outby a 5-axes numerically controlled machine tool.

2. Description of the Related Art

Automatic programming apparatuses for creating NC data for cutting asculptured surface of a metal mold are provided with a software forcreating various NC data, and this software can simultaneously determineoffset data for a tool.

Also, 5-axes numerically controlled machine tools having B- and C-axesfor inclining a tool axis in addition to the usual X-, Y- and Z-axes,are available and can cut a side of a workpiece by using a flat endmill.

When making this side cut, a direction vector of a tool axis isgenerally determined by the following calculation method:

(a) determining dividing points corresponding to the upper and lowersurfaces of a curved surface to be cut;

(b) determining respective normal vectors at these dividing points;

(c) determining points obtained by offsetting the radius of a tool tothe directions of the respective normal vectors; and

(d) creating a vector by connecting these points and using the thuscreated vector as the direction vector of the tool axis.

Nevertheless, this method has the following drawbacks:

First, the direction of the normal vector of the upper surface of acurved surface to be cut does not always coincide with the direction ofthe normal vector of the lower surface thereof, and thus the directionvector of a tool axis may not be parallel to the generating line of thecurved surface and may be twisted.

Second, the tool axis may not be on the line segment (generating line ofthe curved surface) obtained by connecting the points corresponding tothe upper and lower surfaces, respectively, of the curved surface to becut. More specifically, the tool axis is on the generating line onlywhen the normal vector of the upper surface is equal to the normalvector of the lower surface.

As a result, a sculptured surface to be determined is different from anactual machined surface, i.e., a workpiece is bittin or partially notcut.

SUMMARY OF THE INVENTION

Taking the above into consideration, an object of the present inventionis to provide a tool axis direction calculation method of determiningthe direction vector of a tool axis by which a machining surface can bemade closer to a generating line.

To attain the above object, according to the present invention, there isprovided a tool axis direction calculation method of determining adirection vector of the tool axis when a side is cut by a 5-axesnumerically controlled machine tool, which comprises the steps ofdetermining a first normal vector at a first dividing point of the uppersurface of a curved surface, determining a second normal vector at asecond dividing point of the lower surface of said curved surface,determining an intermediate vector having a direction between said firstnormal vector and said second normal vector and a size equal to theradius of a tool, determining a first offset point from said firstdividing point and said intermediate vector, determining a second offsetpoint from said second dividing point and said intermediate vector, anddetermining a vector connecting said first offset point and said secondoffset point as said direction vector of said tool axis.

When a normal vector of an upper surface is different from a normalvector of a lower surface, the direction vector of a tool axis does notcoincide with a generating line. Therefore, an intermediate vectorlocated between the normal vector of the upper surface and the normalvector of the lower surface is determined, and the direction vector ofthe tool axis is determined from the intermediate vector, whereby adirection vector of the tool axis is determined by which a machiningsurface can be made closer to a generating line.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing an example of a workpiece having asculptured surface, for explaining a tool axis direction calculationmethod according to the present invention;

FIG. 2 is a flowchart of the processing effected by the tool axisdirection calculation method according to the present invention; and

FIG. 3 shows a block diagram of hardware of an automatic programmingapparatus embodying the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

An embodiment of the present invention will be described below withreference to the drawings.

FIG. 1 is a diagram showing an example of a workpiece having asculptured surface, for explaining a tool axis direction calculationmethod according to the present invention, wherein a workpiece 1 has asculptured surface 2, a curved line 4 formed by an upper surface 3 andthe sculptured surface 2, and a curved line 6 formed by a lower surfaceand the sculptured surface 2.

Hence, the direction vector of a tool axis need only be parallel withthe generating line Li formed on the sculptured surface made byconnecting an i-th dividing point Pi on the curved line 4 and an i-thdividing point Qi on the curved line 6. Note that a normal vector Ri isdetermined as the outer product of a tangent vector TPi and thegenerating line Li. A normal vector Si is also determined as the outerproduct of a tangent vector TQi and the generating line Li.

In general, however, the direction of the normal vector Ri at thedividing point Pi does not coincide with the direction of the normalvector Si at the dividing point Qi. Therefore, even if a tool axisvector is created from the normal vectors Ri and Si, the directionvector of a tool axis parallel to the generating line Li cannot beobtained.

To cope with this problem, according to the present invention, anintermediate vector Ni located between the normal vector Ri and thenormal vector Si is determined. Namely, a point obtained by extending anintermediate vector Ni from the dividing point Pi is assumed to be anoffset point Xi, and a point obtained by extending an intermediatevector Ni from the dividing point Qi is assumed to be an offset pointYi. A vector obtained by connecting the offset point Xi and offset pointYi is assumed to be Zi, which is used as the direction vector of thetool axis. Accordingly, a direction vector more parallel to thegenerating line Li can be obtained.

A first method of determining the intermediate vector Ni is to obtainthe arithmetic mean of the normal vector Ri and normal vector Si.

Further, as a second method, the intermediate vector Ni can be obtainedby the following formula,

    Ni=(1-k) Ri+kSi

where k is a distribution ratio previously given as a parameter and0≦k≦1. When the distribution ratio k is smaller, the intermediate vectorapproaches the normal vector Ri, and as the distribution ratio k becomeslarger, the intermediate vector approaches the normal vector Si. Thedistribution ratio k is set as the parameter by a user, by determiningwhich normal vector is preferably located closest to the intermediatevector. When the distribution ratio k is not set, an arithmetic mean isused.

Data constituting the sculptured surface 2 can be obtained by processinga language created by an automatic programming, or by data input throughan interactive mode with a curved surface creation module or the like.Therefore, the calculation for determining the direction vector of thetool axis according to the present invention is processes by a prepostprocessor. The thus-obtained result is supplied to a post processor tocreate a final NC data, i.e., a machining program composed of an NClanguage.

FIG. 2 is a flowchart of the processing effected by the tool axisdirection calculation method according to the present invention, whereinnumerals prefixed with an "S" indicate the numbers of steps of theprocess and these steps are processed by the processor of an automaticprogramming apparatus to be described later:

[S1] the i-th dividing point Pi on the upper surface 3 is input;

[S2] the i-th dividing point Qi on the lower surface 5 is input; notethat the data input at steps S1 and S2 is processed by the curvedsurface creation module;

[S3] the normal vector Ri at the dividing point Pi is determined to bethe outer product of the tangent vector TPi and the generating line Li;

[S4] the normal vector Si at the dividing point Qi is determined to bethe outer product of the tangent vector TQi and the generating line Li;

[S5] it is determined whether or not the distribution ratio k is input,and when input, the process goes to step S7, and when not input, theprocess goes to step S6;

[S6] since the distribution ratio k is not input, the arithmetic meansof the normal vectors Ri and Si is determined as the intermediate vectorNi;

[S7] since the distribution ratio k is input, the intermediate vector Niis determined by using the aforesaid formula Ni=(1-k) Ri+kSi;

[S8] the intermediate vector Ni is normalized by being divided by anabsolute value;

[S9] the offset point Xi is determined from the dividing point Pi andintermediate vector Ni;

[S10] the offset point Yi is determined from the dividing point Qi andintermediate vector Ni; and

[S11] the direction vector of the tool axis Zi is determined bydetermining the vector Zi connecting the offset points Xi and Yi andfurther normalizing the vector Zi.

As a result, even if the normal vector of the upper surface does notcoincide with the normal vector of the lower surface, a curved surfacecloser to a sculptured surface can be machined by determining thedirection vector of the tool axis as described above.

FIG. 3 shows a block diagram of hardware of an automatic programmingapparatus embodying the present invention, wherein a processor 21controls the automatic programming apparatus as a whole. A systemprogram is stored in a ROM 22 and the processor 21 determines theaforesaid direction vector Zi of the tool axis in accordance with thesystem program. Intermediate data necessary for determining thedirection vector Zi of the tool axis is stored in a RAM 23. Anon-volatile memory 24 stores parameters such as the distribution ratiok and the like, which must be maintained operative even after a powersupply is cut off, and thus is supplied with a back-up power source suchas a battery.

A display control circuit 25 converts the data stored in the RAM 23 to adisplay signal, which is supplied to a display unit 26 and displayedthereat. A CRT, liquid crystal display or the like is used as thedisplay unit 26.

A keyboard 27 is composed of software keys, function keys havingpredetermined functions, and operation keys composed of numeric keys andalphabet keys.

A floppy disk drive 28 sequentially writes created NC data (machiningprogram) to a floppy disk 28a. Further, the created NC data may beprinted-out to an externally connected printer or the like through aninterface 29. These elements are interconnected to a bus 30,respectively.

As described above, according to the present invention, since anintermediate vector is determined from a normal vector of an uppersurface and a normal vector of a lower surface, and the direction vectorof a tool axis is determined from the intermediate vector, even if thedirection of the normal vector of the upper surface is different fromthe direction of the normal vector of the lower surface, a directionvector of the tool axis closest to a generating line can be obtained,and as a result, a side cut closest to a desired sculptured surface canbe carried out.

We claim:
 1. A tool axis direction calculation method for determining adirection vector of a tool axis when a side of a workpiece is cut by a5-axes numerically controlled machine tool, comprising the stepsof:determining a first normal vector at a first dividing point locatedbetween an upper surface and a curved surface of said workpiece;determining a second normal vector at a second dividing point locatedbetween a lower surface and said curved surface of said workpiece;determining an intermediate vector having a direction between said firstnormal vector and said second normal vector and a size equal to a radiusof a tool; determining a first offset point from said first dividingpoint and said intermediate vector; determining a second offset pointfrom said second dividing point and said intermediate vector;determining a vector connecting said first offset point and said secondoffset point to be said direction vector of said tool axis; and usingsaid direction vector of said tool axis by said 5-axes numericallycontrolled machine tool.
 2. A tool axis direction calculation methodaccording to claim 1, wherein said intermediate vector is determined asthe arithmetic mean of said first normal vector and said second normalvector.
 3. A tool axis direction calculation method according to claim1, wherein said intermediate vector is determined by a formula

    Ni=(1-k) Ri+kSi

where Ni is said intermediate vector, k is a distribution ratiopreviously given as a parameter, Ri is a first normal vector, and Si isa second normal vector.